package com.lee

class TestController {

    def jobManagerService

    def index() {

//        def myTrigger = new CronTriggerImpl()
//        myTrigger.setName("myTrigger_test1")
//        myTrigger.setCronExpression('1 * * * * ?')
        MyJob.schedule(1000)
        render "测试Job."
    }

    def stop () {
//        jobManagerService.getQuartzScheduler().unscheduleJob("test","MyGroup")
        jobManagerService.resumeJob("MyJob");
        render "任务已经停止."
    }
}